package com.mmy.service.impl.visa;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.visa.TVisaCollectionRepository;
import com.mmy.dao.visa.VVisaCollectionRepository;
import com.mmy.domain.visa.TVisaCollection;
import com.mmy.domain.visa.VVisaCollection;
import com.mmy.service.visa.TVisaCollectionService;

@Service
public class TVisaCollectionServiceImpl implements TVisaCollectionService {

	@Autowired
	TVisaCollectionRepository tVisaCollectionRepository;
	@Autowired
	VVisaCollectionRepository vVisaCollectionRepository;

	/* 获取最大值 */
	public Object getMaxCollectionID() {
		// TODO Auto-generated method stub
		return tVisaCollectionRepository.getMaxCollectionID();
	}

	/* 创建整理材料表 */
	public void save(int collectionID) {
		// TODO Auto-generated method stub
		tVisaCollectionRepository.save(collectionID);
	}

	/* 创建修改整理材料表 */
	public void save(TVisaCollection tVisaCollection) {
		// TODO Auto-generated method stub
		tVisaCollectionRepository.save(tVisaCollection);
	}

	/* 通过订单号获得材料整理表 */
	public List<VVisaCollection> findByOrderID(String cOrderID) {
		// TODO Auto-generated method stub
		return vVisaCollectionRepository.findByOrderID(cOrderID);
	}

	/* 修改提交状态 */
	public void updateSubmit(List<Integer> lstID, String userName) {
		// TODO Auto-generated method stub
		tVisaCollectionRepository.updateSubmit(lstID, userName);
	}

}
